1. Field of the Invention
This invention relates to power management in a computing system, and, more particularly, to a method and apparatus for switching electrical power to a device interface circuit of the system in response to a determination of whether a device is connected to the system through the circuit.
2. Background Information
The length of time during which a portable computing system can be operated with an internal battery, without a need for connection to an external power source, often determines the usefulness of the computing system. Efforts to increase the length of this time have been centered around the development of power management routines, which attempt to minimize the use of electrical power while responding to the actual conditions management routine drives a computing system into a suspense mode when a prescribed time has elapsed since the last external input to the computing system. Since external device interface circuits, which are associated with the various individual Input/Output (I/O) ports of a portable computing system, are known to require levels of electrical power that are sufficient to cause a reduction in the time during which the system can be used without recharging its battery, some power management routines reduce the power supplied to such circuits when the interface is not in use. However, what is needed is a power management routine having a capability to completely shut down electrical power to a device interface circuit when the interface is not in use, particularly as indicated by the lack of a cable from an external device connected to operate through the interface.
The use of portable computing systems has created an increasing need to change the configuration of a computing system on a frequent basis. For example, a portable computer may be disconnected from various external devices in an office, taken home for use and night, and reconnected to the external devices in the office the next morning. Such an increased need to unplug and replug cable connections leads to an increased probability that some cables will be left unplugged. While conventional operating systems and device drivers display error messages indicating that an external device may unplugged, such messages are based, for example, on not receiving an acknowledgment or other response from the external device in a predetermined time, or on not receiving data signals expected to be received from the external device. Since such conditions may be caused by a number of factors, including various types of failures occurring in the external device, there is a need to develop a more specific way to determine when the cable is unplugged, so that a more specific and accurate message can be given.
An increasing use is also being made of external devices that can be safely connected to and disconnected from a computing system without turning electrical power off in the computing system. What is needed is a method recognizing the connection or disconnection of a cable to an external device when the system power is left on. Such a determination should be made on a continuous or periodic basis, without relying on a power-on reset routine to make a proper determination.
U.S. Pat. No. 6,149,464, the disclosure of which is incorporated herein by reference describes the use, in a computing system, of a port connector provided with a flexible electrical contact for determining the presence of the electrically grounded flange of a cable connector that may be attached to the port connector. Using this feature, the computing system can determine whether a peripheral device is attached to the port connector by means of a cable. While modification of the port connector to provide the additional contact is required, this method has the advantage of working with a standard cable connector having an electrically grounded shield to make electrical contact with the additional contact. Thus, what is needed is a method for determining whether an external cable is connected without requiring modification of the port connector and further without placing a restriction on the type of cable connector requiring a grounded shield, which is not present on some conventional cable connectors.
U.S. Pat. No. 6,149,464 also describes the use of a switchable power supply, having an ability to switch various of its outputs from an “on” condition to an “off” condition, together with the ability of the computing system to recognize which, if any, ports are connected to peripheral devices, to turn off electrical power to individual port control circuits associated with ports not connected to such devices. However, what is needed is a method providing such a capability without requiring the use of a power supply having such switchable outputs. It is particularly desirable that such a method could be controlled by a power management routine executing within the processor of the computing system that the apparatus associated with the method can be confined to the motherboard of the computing system, without requiring changes or special features within the power supply.
While U.S. Pat. No. 6,149,464 also describes the use of a determination that an external device is not connected to the computing system in the presentation of a suitable error message, this message is presented only in response to a previous detection of an error regarding the use of the external device. What is needed is a method presenting a disconnection error message directly in response to an attempt to use the external device, without first relying on another type of error detection.
While U.S. Pat. No. 6,149,464 also describes the use of a determination of whether a cable to an external device is connected to determine whether to load a device driver, this is only done as the device drivers are loaded, typically during an initialization process following power-on. Since many external devices may be disconnected without turning power off, what is needed is method for unloading a device driver in response to disconnection of a cable to an external device.
U.S. Pat. Nos. 5,463,261 and 5,606,704 describe power conservation circuits for peripheral interface modules, such as a PC cards (formerly called PCMCIA cards). The peripheral interface module is designed for use with a peripheral device that is coupled to the module via a peripheral device plug. A sensing means senses whether the plug engages the socket as an indication of whether the module is actually in use. In response, switching means disconnects power to the module when the plug does not engage the socket and connects this power when the plug engages the socket.
U.S. Pat. No. 5,784,870 describes a system including a computer and a plug-in card, having a remote data link, which draws power from the computer. Power to the card is controlled in response to a status monitor showing whether the data link and its connector are operable for data communications.
U.S. Pat. No. 5,944,831 describes a power management method in a computer system having a PC card connected to a communication channel, with the method including detecting a disconnection of the communication channel from the PC card and terminating power supplied to the PC card in response to the detection of the disconnection of the communication device.
U.S. Pat. No. 5,347,265 describes information processing apparatus including a main control unit detachably attached as a board into the main body of the apparatus. A detection circuit detects whether the main control unit is attached by determining whether an operation panel in the main body of the apparatus has received an initialization command from the main control unit.
The patent literature also includes a number of patents describing methods for modifying a cable connector configuration to provide a signal indicating whether a mating connector is attached to the cable connector, with the use of the signal not being disclosed, or with the signal being used to provide an indication of disconnection, such as by lighting a lamp. For example, U.S. Pat. No. 3,611,261 describes such a cable connector, with the resulting signal being used to check circuit continuity. U.S. Pat. No. 4,915,649 describes such a connector being used to light an indicator lamp, providing an indication that the connection has been made. U.S. Pat. No. 3,414,806 describes a connector including a resistive pin which provides electrical resistance if the mating connectors are not fully connected. U.S. Pat. No. 5,061,204 describes such a connector in which a circuit is completed between two contacts when the mating connector is engaged. U.S. Pat. No. 4,903,340 describes the use of a reed switch in an optical data connector, activated by a magnet in the mating connector, to provide such an indication. U.S. Pat. No. 5,273,456 describes a connector having a pair of contacts biased together to touch one another, which are forced apart by a wedge-shaped separator in the mating connector. U.S. Pat. No. 5,127,847 describes mating connectors including a resilient locking arm, a lock verification slider, and a pair of terminals which are electrically connected to indicate that the connectors are properly locked. U.S. Pat. No. 5,674,085 describes a connector including switch contacts operated by the mating connector.
A circuit for detecting whenever a pluggable unit, such as a keyboard or mouse, is connected to, or disconnected from, a computing system without first disconnecting electrical power to the computing system is described in the IBM Disclosure Bulletin, Vol. 38, No. 06b, June, 1993, pp 371-372. A signal line that is electrically grounded within the pluggable unit is tied to an input of a buffer and to a voltage through a pull-up resistor. When the pluggable unit is disconnected with power on in the computing system, this voltage passes through a buffer to set a latch, which is subsequently reset during a power-on reset cycle.